<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
  String path = request.getContextPath();
%>
<html>
	<head>
		<title>人员信息</title>
	</head>
	<jsp:include page="../common/init.jsp"></jsp:include>
	<script type="text/javascript">
var ryxm = "";
var rybh = "";
//验证人员信息radio选中
function checkSCount() 
{
	var intSCount=0;
	ryxm = "";
	rybh = "";
	if (document.forms[0].rybh!=null)
	{	
		var bhLength = document.forms[0].rybh.length;
		for(i=0;i<bhLength;i++) 
		{
			if(document.forms[0].rybh[i].checked)
			{
				intSCount=intSCount+1;
				if(i==(bhLength-1)){
					rybh += document.forms[0].rybh[i].value.split("#")[0]//人员编号
	                ryxm += document.forms[0].rybh[i].value.split("#")[1]//人员姓名
				}else{
					rybh += document.forms[0].rybh[i].value.split("#")[0]+","//人员编号
					ryxm += document.forms[0].rybh[i].value.split("#")[1]+"，"//人员姓名					
				}
			}
		}
	}
	return intSCount;
}
function doSubmit()
{
   		if(checkSCount()<1)
		{
			alert("请选中要添加用户的记录!");
			return false;
		}
		else
		{
		   	var ryxx = new Array();
		   	ryxx[0]=ryxm;
		   	ryxx[1]=rybh;
		   	parent.window.returnValue=ryxx;
		   	parent.window.close();
		}
}
//数据查询;
function doSear(action)
{
	if(isSpecial(document.getElementById("xm").value))
	{
		alert("姓名包含非法字符,请重新输入!");
		document.getElementById("xm").focus();
		return false;
	}
	else if(isSpecial(document.getElementById("zw").value))
	{
		alert("职务包含非法字符,请重新输入!");
		document.getElementById("zw").focus();
		return false;
	}
	else
	{
		doSearch(action);
	}
}
mpmenu4=new mMenu('','doSear(\"listRyjbxx.do?urlFlag=selRy\")','script','<%=path%>/images/img_ht_wz_46.gif','62','24','0','300','0');
</script>
	<%
		response.setHeader("Cache-Control", "no-store");
		response.setDateHeader("Expires", 0);
		response.setHeader("Pragma", "no-cache");
	%>
	<body>
		<div id="rightall">
			<s:form action="">
				<table cellspacing="0" cellpadding="0" class="main_tab1">
					<tr>
						<td class="">
							<img src="<%=path%>/images/img_ht_wz_28.gif"
								alt="left" />
						</td>
						<td class="main_tab1_td2">
							<div id="location">
								人员信息
							</div>
							<div id="funbut">
								<SCRIPT>document.write(mwritetodocument());</SCRIPT>
							</div>
						</td>
						<td class="main_tab1_td1">
							<img src="<%=path%>/images/img_ht_wz_32.gif"
								alt="right" />
						</td>
					</tr>
					<tr>
						<td colspan="3" class="main_tab1_td3">
							<div id="mainbg">
								<div class="jiange10"></div>
								<table width="100%" border="0" cellspacing="0" cellpadding="0"
									class="main_tab3">
									<tr>
										<th width="100">
											<img
												src="<%=path%>/images/img_ht_wz_58.gif"
												alt="查询条件" class="img_01">
											查询条件
										</th>
										<td>
											<table width="100%" border="0" cellspacing="0"
												cellpadding="0" class="main_tab4">
												<tr>
													<th>
														姓名：
													</th>
													<td>
														<s:hidden name="actionId"></s:hidden>
														<s:hidden name="bmbh"></s:hidden>
														<input name="rybhs" type="hidden" value="">
														<input id="xm" name="ryjbxx.xm" type="text" class="inp_01"
															size="20" maxlength="25"
															value="<s:property value="ryjbxx.xm" />">
													</td>
													<th>
														职务：
													</th>
													<td>
														<input id="zw" name="ryjbxx.zw" type="text" class="inp_01"
															size="20" maxlength="25"
															value="<s:property value="ryjbxx.zw" />">
													</td>
													<td>
														&nbsp;
													</td>
													<td>
														&nbsp;
													</td>
													<td>
														&nbsp;
													</td>
													<td>
														&nbsp;
													</td>
												</tr>
											</table>
										</td>
									</tr>
								</table>
								<div class="jiange10"></div>
								<div style="overflow: scroll; width: 100%; height: 60%;">
									<table width="100%" border="1" cellspacing="0" cellpadding="0"
										class="main_tab2">
										<tr valign="bottom" align="center" height="30">
											<th>
												&nbsp;
											</th>
											<th>
												编号
											</th>
											<th>
												姓名
											</th>
											<th>
												职务
											</th>
										</tr>
										<s:set name="cssClass" value="'main_tab2_td1'"></s:set>
										<s:iterator value="ryxxList" status="index">
											<s:if test="#index.index%2==0">
												<s:set name="cssClass" value="'main_tab2_td1'"></s:set>
											</s:if>
											<s:else>
												<s:set name="cssClass" value="'main_tab2_td2'"></s:set>
											</s:else>
											<tr valign="bottom" height="20"
												class="<s:property value="#cssClass"/>"
												ondblclick="popPage('infoRyjbxx.do?rybh=<s:property  value="rybh" />',550,600);">
												<td align="center" class="r_tab_c_4">
													<input type="checkbox" name="rybh"
														value="<s:property  value="rybh" />#<s:property  value="xm" />">													
												</td>
												<td align="left" class="r_tab_c_4">
													&nbsp;
													<s:property value="rybh" />
												</td>
												<td align="left" class="r_tab_c_4">
													&nbsp;
													<a href="#"
														onclick="popPage('infoRyjbxx.do?rybh=<s:property  value="rybh" />',550,600);"><s:property
															value="xm" />
													</a>
												</td>
												<td align="left" class="r_tab_c_4">
													&nbsp;
													<s:property value="zw" />
												</td>
											</tr>
										</s:iterator>
									</table>
								</div>	
								   <jsp:include page="../common/page.jsp">
			                              <jsp:param value="listRyjbxx.do" name="doAction"/>
			                              <jsp:param value="selRy" name="urlFlag"/>
			                       </jsp:include>									
									<div class="butk">
									<div class="btn_01">
										<a href="#" onclick="doSubmit()">保&nbsp;存</a>
									</div>
									<div class="btn_01">
										<a href="#" onclick="parent.window.close();">关&nbsp;闭</a>
									</div>
								</div>
								</div>								
						</td>
					</tr>
					<tr>
						<td class="main_tab1_td4">
							<img src="<%=path%>/images/img_ht_wz_65.gif"
								alt="left" />
						</td>
						<td class="main_tab1_td5"></td>
						<td class="main_tab1_td4">
							<img src="<%=path%>/images/img_ht_wz_67.gif"
								alt="right" />
						</td>
					</tr>
				</table>
			</s:form>
		</div>
	</body>
</html>
